#include "widget.h"
#include "Server.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    HttpServer *httpServer = HttpServer::getInstance();
    if (!httpServer->init())
    {
        qDebug() << "HTTP 服务器启动失败";
        return -1;
    }
    qDebug() << "HTTP 服务器启动成功";
    WebSocketServer *webSocketServer = WebSocketServer::getInstance();
    if (!webSocketServer->init())
    {
        qDebug() << "WebSocket 服务器启动失败";
        return -1;
    }
    qDebug() << "WebSocket 服务器启动成功";
    Widget w;
    w.show();
    return a.exec();
}
